<template>
    <view class="container">
        <view class="menu-bar">
            <view class="menu-item" v-for="item in menus" :key="item.name" @click="go(item.path)">
                <view class="menu-item-text">{{ item.name }}</view>
            </view>
        </view>
    </view>
</template>
<script>
export default {
    data() {
            return {
                menus: [
                    { name: '钓鱼', path: '/pages/fishing/index' },
                    { name: '商城', path: '/pages/shop/index' },
                ]
            }
        },
    methods: {
        
        go(path) {
            console.log(path)
            wx.navigateTo({
                url: path,
            })
        },
    },
}
</script>
<style lang="less" scoped>
.menu-bar{
    display: flex;
    justify-content: space-around;
    padding: 10rpx;
    .menu-item{
        background-color: aqua;
        flex: 1;
        display: flex;
        justify-content: center;
        padding: 10rpx;
        &:nth-child(1){
            border-right: 1px solid #999;
        }
    }
}
</style>